package chapter11

import scala.collection.mutable.ArrayBuffer

/**
  * @Copyright: Shanghai Definesys Company.All rights reserved.
  * @Description:
  * @author: chuhaitao
  * @since: 2019/1/13 14:40
  * @history:
  *          1.2019/1/13 created by chuhaitao
  */
object MlutiplyDemo {

  def main(args: Array[String]): Unit = {

    var arr01 = Array.ofDim[Int](2, 2)

    var scalaArr = new ArrayBuffer[String]()
    scalaArr.append("1")
    import scala.collection.JavaConversions.bufferAsJavaList

    //使用了bufferAsJavaList的隐式函数
    var javaArr = new ProcessBuilder(scalaArr)

    var javaArr02 = javaArr.command()
      //使用隐式函数将 scala数组转换成java的数组
    var javaArr03: java.util.List[String] = scalaArr
    println(javaArr03)


    import scala.collection.JavaConversions.asScalaBuffer
    import scala.collection.mutable
    //将java数组转换成  scala数组
    var scalaArr01:mutable.Buffer[String]=javaArr03;


  }

}
